package com.fce.fcesystem.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @BelongsProject: booksystem
 * @BelongsPackage: com.example.booksystem.pojo
 * @Author: furuibo
 * @CreateTime: 2022-09-09  19:52
 * @Description: 用户实体类
 * @Version: 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class User implements Serializable {
    private Integer userId;

    private String href;

    private String account;

    private String password;

    private String salt;

    private String email;

    private String emailKey;

    private int emailState;

    private String phone;

    private List<Role> roles;

    @DateTimeFormat(pattern = "yyyy-MM-dd")//传入参数处理
    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")//传出结果处理
    private Date register_time;

    private String status;

    private Integer roleId;

    private String roleName;

}
